package record;

import java.util.*;

/**
 * A class that is used to store all the projects for a user.
 * @author Stephan Jossie
 * @author Jacob Freemyer
 * @author Sean Freitag
 *
 */
@SuppressWarnings("serial")
public class AllProjectsRecord implements Record {

	/**
	 * All records for a given user
	 */
	private LinkedList<ProjectRecord> records;
	
	/**
	 * Creates an AllProjectsRecord that is a record of all the project records of the user
	 * @param records
	 * 		The records of the user.
	 */
	public AllProjectsRecord(LinkedList<ProjectRecord> records){
		this.records = records;
	}
	
	/**
	 * Getter to get all the project records of the user
	 * @return
	 * 		Project records for user.
	 */
	public LinkedList<ProjectRecord> getRecords(){
		return records;
	}
	
	/**
	 * Adds a project record to the users project records collection
	 * @param record
	 * 		Project record to add to the collection of records
	 * @return
	 * 		True - record added
	 * 		False - record not added
	 */
	public boolean addProjectRecord(ProjectRecord record)
	{
		return records.add(record);
	}
}
